<template>
  <el-drawer v-model="drawerVisible"
             direction="rtl"
             title="bpmn:StartEvent"
             :size="500"
             header-class="shadow-l mb-0 pb-4"
             @open="onDrawerOpen">
    <template #default>

    </template>
    <template #footer>
      <div style="flex: auto">
        <el-button @click="eventData=null;drawerVisible=false">关闭</el-button>
        <el-button type="primary" @click="onSave">保存</el-button>
      </div>
    </template>
  </el-drawer>
</template>

<script setup>
/////////////////////////////////   外部依赖导入    //////////////////////////
import {onMounted, onUnmounted, ref, reactive, defineProps, defineEmits, computed, nextTick} from 'vue'
import {$localStorage} from "@/utils/application-storage.js";
import $apiService from "@/axios/api.js";
import {QuestionFilled} from "@element-plus/icons-vue";

/////////////////////////////////   组件参数    //////////////////////////

/////////////////////////////////   私有变量定义    //////////////////////////
const basicInfoFormRules = reactive({
  name: [{required: true, message: '请输入账户', trigger: 'blur'}],
  keyCode: [{required: true, message: '请输入', trigger: 'blur'}],
  customDefinitionCode: [{required: true, message: '请输入', trigger: 'blur'}],
  actualTableName: [{required: true, message: '请选择', trigger: 'blur'}],
})
const dialogFormRules = reactive([])
const dialogForm = ref({
  title: ""
})
const drawerVisible = ref(false)
const eventData = ref({})
const applicationList = ref([])

/////////////////////////////////   生命周期方法 //////////////////////////
onMounted(() => {
  // getWorkflowFormOptions()
});
onUnmounted(() => {
});

/////////////////////////////////   页面方法    //////////////////////////
const show = async (data) => {
  drawerVisible.value = true
  if (data) workFlowData.value = data
  await nextTick();
}
// const getWorkflowFormOptions = () => {
//   const data = {
//     params: {
//       actualFormType: 'ProcessForm',
//       status: 'Enable',
//     },
//     all: true,
//   }
//   $apiService.getFormList(data).then((res) => {
//     workflowFormOptions.value = res.data.data.content.map((item) => {
//       const {formName, actualTableName} = item
//       return {label: formName, value: actualTableName}
//     })
//   })
// }
const submitDialogForm = () => {
}
const openFormDialog = (action, event, data) => {

}
const onDrawerOpen = () => {
  // if (scriptHelpDrawerContent.value) return
  // $apiService.queryDefaultJsFunctionsInstruction().then((res) => {
  //   scriptHelpDrawerContent.value = res.data.data
  // })
}
const onSave = () => {
}
/////////////////////////////////   暴露内部方法，让父组件可以访问    //////////////////////////
defineExpose({
  show
});
</script>

<style scoped>
</style>
